package com.lws.applicationlifecycle;

import android.content.Context;

public interface AppLifeCycleObserver {

    default void attachBaseContext(Context base) {
        Object appLifeCycle = base.getSystemService(AppLifeCycle.NAME);
        if (appLifeCycle instanceof AppLifeCycle) {
            ((AppLifeCycle) appLifeCycle).addAppLifeCycleObserver(this);
        }
    }

    default void onCreate() {

    }


    default void onTerminate() {

    }
}
